<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑课程</title>
    <style>
        .form-group { margin-bottom: 15px; }
        label { display: block; margin-bottom: 5px; }
        input { width: 300px; padding: 8px; border: 1px solid #ddd; border-radius: 4px; }
        button { padding: 10px 20px; background-color: #008CBA; color: white; border: none; border-radius: 4px; cursor: pointer; }
    </style>
</head>
<body>
<h2>编辑课程</h2>
<form action="${pageContext.request.contextPath}/course/edit" method="post">
    <input type="hidden" name="courseid" value="${course.courseid}">
    <div class="form-group">
        <label>课程代码:</label>
        <input type="text" name="course" value="${course.course}" required>
    </div>
    <div class="form-group">
        <label>课程名称:</label>
        <input type="text" name="name" value="${course.name}" required>
    </div>
    <div class="form-group">
        <label>教师ID:</label>
        <input type="number" name="teacher_id" value="${course.teacher_id}" required>
    </div>
    <div class="form-group">
        <label>学分:</label>
        <input type="number" name="credit" value="${course.credit}" required>
    </div>
    <button type="submit">保存</button>
</form>
</body>
</html>